home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / comm / term / term_47a_pch.lha / Source / gtlayout-38.3 / LT_UpdateStrings.c < prev    next >
C/C++ Source or Header  |  1996-11-10  |  2KB  |  80 lines

  1. /*
  2. **    GadTools layout toolkit
  3. **
  4. **    Copyright © 1993-1996 by Olaf `Olsen' Barthel
  5. **        Freely distributable.
  6. **
  7. **    :ts=4
  8. */
  9.  
  10. #ifndef _GTLAYOUT_GLOBAL_H
  11. #include "gtlayout_global.h"
  12. #endif
  13.  
  14. STATIC VOID
  15. LTP_UpdateStrings(ObjectNode *Group)
  16. {
  17.     ObjectNode    *Node;
  18.     ULONG         Page;
  19.  
  20.     SCANPAGE(Group,Node,Page)
  21.     {
  22.         switch(Node->Type)
  23.         {
  24.             case FRACTION_KIND:
  25.             case PASSWORD_KIND:
  26.             case STRING_KIND:
  27.             case INTEGER_KIND:
  28.  
  29.                 if(Node->Host)
  30.                     LTP_PutStorage(Node);
  31.  
  32.                 break;
  33.  
  34.             case GROUP_KIND:
  35.  
  36.                 LTP_UpdateStrings(Node);
  37.                 break;
  38.         }
  39.     }
  40. }
  41.  
  42. /****** gtlayout.library/LT_UpdateStrings ******************************************
  43. *
  44. *   NAME
  45. *    LT_UpdateStrings -- Make sure all visible string buffer contents
  46. *                        get written into storage (v9).
  47. *
  48. *   SYNOPSIS
  49. *    LT_UpdateStrings(LayoutHandle);
  50. *                            A0
  51. *
  52. *    VOID LT_UpdateStrings(struct LayoutHandle *);
  53. *
  54. *   FUNCTION
  55. *    The user can terminate input into a string gadget or an object
  56. *    derived from a string gadget by various means. They all have
  57. *    in common that the application receives no notification that
  58. *    the string gadget contents have changed. This is particularly
  59. *    nasty with objects which make use of LA_STRPTR or other
  60. *    tags. Using LT_UpdateStrings() you can force all visible string
  61. *    gadget objects to hand over their contents to the internal
  62. *    buffers. Do this before you eventually exit your input loop.
  63. *
  64. *   INPUTS
  65. *    LayoutHandle - Pointer to LayoutHandle structure.
  66. *
  67. *   RESULT
  68. *    none
  69. *
  70. ******************************************************************************
  71. *
  72. */
  73.  
  74. VOID LIBENT
  75. LT_UpdateStrings(REG(a0) LayoutHandle *Handle)
  76. {
  77.     if(Handle)
  78.         LTP_UpdateStrings(Handle->TopGroup);
  79. }
  80.